<?php
/**
 * Yii view _widget
 *
 * @author nguyenmanhluu
 * @since Aug 19, 2013 - 7:11:31 PM
 */
?>
<div class="row-fluid">
    <div class="box span12 box-widget">
        <div class="box-header">
            <h2><?php echo $widget->name ?></h2>
            <div class="box-icon">                    
                <a href="#" class="btn-minimize"><i class="icon-chevron-down"></i></a>
            </div>
        </div>
        <div class="box-content alerts" style="display: none">
            <?php if ($widget->widgetDatas != NULL): ?>
                <form method="POST">
                    <fieldset>
                        <?php foreach ($widget->widgetDatas as $data): ?>
                            <div class="control-group">
                                <label for="<?php echo "widget-$data->id-$data->name" ?>">
                                    <?php echo $data->description ?>
                                </label>
                                <div class ="controls">
                                    <input type="text" 
                                           id="<?php echo "widget-$data->id-$data->name" ?>"
                                           name="<?php echo "widget[$data->id][$data->name]" ?>"
                                           value="<?php echo $data->value ?>"/>
                                </div>
                            </div>
                        <?php endforeach; ?>                    
                        <div class="control-group">
                            <div class ="controls">
                                <button>Save</button>
                            </div>
                        </div>
                    </fieldset>
                </form>
            <?php endif; ?>
        </div>
    </div><!--/span-->
</div>